

pub static mut RBATIS: Option<rbatis::Rbatis> = Option::None;

pub fn init_rbatis(db_url: &str)
{
    let db_driver = rbdc_mysql::driver::MysqlDriver {};
    unsafe { RBATIS = Some(rbatis::Rbatis::new()) };
    unsafe {
        RBATIS
            .as_ref()
            .unwrap()
            .init(db_driver, db_url)
            .expect("rbatis init failed");
    }
}


pub fn get_rbatis() -> &'static mut rbatis::Rbatis
{
    unsafe { RBATIS.as_mut().unwrap() }
}


